package com.example.practicespring.utils;

import java.time.LocalTime;
import java.util.List;
import java.util.stream.Collectors;

public class SortTimeUtils {

    public static List<String> sortTimes(List<String> times) {
        return times.stream()
                .sorted((time1, time2) -> LocalTime.parse(time1).compareTo(LocalTime.parse(time2)))
                .collect(Collectors.toList());
    }
}
